import math;
def PT_bac_2(a,b,c,x1,x2):
   delta = b*b*1.0-4*a*c   
   if delta == 0:
       x1 = -b*1.0/(2*a)
       print "Phuong trinh co 1 nghiem"
       print x1  
   elif delta > 0:
       deltasqrt = math.sqrt(delta)
       x1 = (-b+deltasqrt)/(2.0*a)
       x2 = (-b-deltasqrt)/(2.0*a)    
       print "Phuong trinh co 2 nghiem"
       print x1
       print x2  
   else: 
       print "Phuong trinh co 2 nghiem phuc"
       deltasqrt = math.sqrt(-delta)
       print "(" + str(-b) + "+" + str(format(deltasqrt,"0.2f")) + "i)/" + str(2*a)  
       print "(" + str(-b) + "-" + str(format(deltasqrt,"0.2f")) + "i)/" + str(2*a) 
   
print "Giai phuong trinh ax^2 + bx + c = 0"

a = raw_input("Nhap a: ")

b = raw_input("Nhap b: ")

c = raw_input("Nhap c: ")

x1 = 0.0
x2 = 0.0

PT_bac_2(int(a),int(b),int(c),x1,x2)
    
    
    
    